package com.lavender.annotation._conditional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 * <p>
 * 自定义注解
 * </p>
 *
 * # @Conditional原理参考：{@link org.springframework.context.annotation.ConditionEvaluator}
 *
 * @author: zhu.chen
 * @date: 2020/12/13
 * @version: v1.0.0
 */
@Component
public class TestAnnotationCommand implements CommandLineRunner {

    @Autowired
    private ApplicationContext context;

    @Override
    public void run(String... args) throws Exception {
        System.out.println(context.getBean(TestAnnotation.class));
    }

}
